import sys
import os

thisDir = os.path.split(os.path.realpath(__file__))[0]
sys.path.append(os.path.join(thisDir, "..", "..", "common"))
sys.path.append(os.path.join(thisDir, "..", "..", "ui"))
sys.path.append(os.path.join(thisDir, "..", "..", "server", "ps"))

import EJOConfig
import EJOUiInitializer

import logging
logger = logging.getLogger(__name__)

def Start():
    logger.debug("[test.ui] Start")
    print("[test.ui] Start")    

    initializer = EJOUiInitializer.EJOUiInitializer()
    if initializer.Initialize():
        logger.debug("[test.ui] Initialize pass")
        print("[test.ui] Initialize pass")        
    else:
        logger.debug("[test.ui] Initialize fail")
        print("[test.ui] Initialize fail")

    logger.debug("[test.ui] End")
    print("[test.ui] End")

if __name__ == "__main__":
    logging.basicConfig(filename = EJOConfig.TEST_LOG_PATH, level = EJOConfig.TEST_LOG_LEVEL)
    Start()
